import { Component, OnInit } from '@angular/core';
import { DrawingFeaturePopoverSubject } from '../interaction-draw/drawing-feature-popover-ref';
import { PopoverProperty } from './drawing-feature-popover.model';

@Component({
  selector: 'ege-drawing-feature-popover',
  templateUrl: './drawing-feature-popover.component.html',
  styleUrls: ['./drawing-feature-popover.component.scss']
})
export class DrawingFeaturePopoverComponent implements OnInit {

  data: PopoverProperty[];

  constructor(
    private ref: DrawingFeaturePopoverSubject
  ) { }

  ngOnInit() {
    this.data = this.ref.getProperties() || [];
  }

  onClickClose(): void {
    this.ref.closeCallback();
  }

  onClickRemove(): void {
    this.ref.removeCallback();
  }

}
